<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>凯盛项目管理系统</title>
<link rel="stylesheet" type="text/css" href="style/bootstrap.min.css" />
		<link rel="stylesheet" href="style/jquery.ui.core.css">
		<link rel="stylesheet" href="style/jquery.ui.datepicker.css">
		<link rel="stylesheet" href="style/jquery.ui.theme.css">
		<script type="text/javascript" src="js/jquery.1.7.js"></script>
		<script type="text/javascript" src="js/bootstrap-modal.js"></script>
		<script src="js/jquery.ui.core.js"></script>
		<script src="js/jquery.ui.widget.js"></script>
		<script src="js/jquery.ui.datepicker.js"></script>
		<script src="js/jquery.ui.datepicker-zh-CN.js"></script>
<style type="text/css">
body {
	padding-top: 70px;
	padding-left: 70px;
	background-image:url(img/ab.png);
}

input {
	height: 30px;
}
</style>
<script type="text/javascript">
			$(function() {
				$("#datepicker1").datepicker({
					changeMonth : true,
					changeYear : true
				});
				$("#datepicker2").datepicker({
					changeMonth : true,
					changeYear : true
				});
			});
</script>
</head>
<body class="body">

	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="brand" href="#">凯盛项目管理系统</a>
			</div>
		</div>
	</div>


	<div class="container">
		<div class="row">
			<div class="span9">
				<form method="post" action="updatetask.action">
					<input type="hidden" name="task.id" value="${task.id}">
					
				    <input type="hidden" name="goal.id" value="${task.goal.id}">
					<fieldset>
						<legend>编辑任务</legend>
						<div class="control-group">
							<label class="control-label" for="input01">任务名称</label>
							<div class="controls">
								<input type="text" class="span5" id="input01"
									x-webkit-speech="undefined" name="task.taskname"
									value="${task.taskname}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="input01">开始时间</label>
							<div class="controls">
								<input type="text" class="span5" id="datepicker1"
									x-webkit-speech="undefined" name="task.starttime"
									value="${task.starttime}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="input01">截止时间</label>
							<div class="controls">
								<input type="text" class="span5" id="datepicker2"
									x-webkit-speech="undefined" name="task.endtime"
									value="${task.endtime}">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="input01">任务描述</label>
							<div class="controls">
								<textarea class="span5" rows="8" name="task.taskdesc">${task.taskdesc}</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="multiSelect">状态</label>
							<div class="controls">
								<select id="multiSelect" name="task.state">
									<option value="新任务" <c:if test="${task.state=='新任务'}">selected="selected"</c:if>>新任务</option>
									
									<option value="进行中" <c:if test="${task.state=='进行中'}">selected="selected"</c:if>>进行中</option>
									
									<option value="已完成" <c:if test="${task.state=='已完成'}">selected="selected"</c:if>>已完成</option>
										
								</select>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="multiSelect">级别</label>
							<div class="controls">
								<select id="multiSelect" name="task.level">
									<option value="重要紧急" <c:if test="${task.level=='重要紧急'}">selected="selected"</c:if>>重要紧急</option>
										
									<option value="重要不紧急" <c:if test="${task.level=='重要不紧急'}">selected="selected"</c:if>>重要不紧急</option>
									
									<option value="紧急不重要" <c:if test="${task.level=='紧急不重要'}">selected="selected"</c:if>>紧急不重要</option>
										
									<option value="不紧急不重要" <c:if test="${task.level=='不紧急不重要'}">selected="selected"</c:if>>不紧急不重要</option>
										
								</select>
							</div>
						</div>

						<div class="control-group">
							<label class="control-label" for="multiSelect">负责人</label>
							<div class="controls">
								<select id="multiSelect" name="selectname">
									<c:forEach items="${userprojectList}" var="userproject">
										<option <c:if test="${task.user.username==userproject.user.username}">selected="selected"</c:if> value="${userproject.user.id}">${userproject.user.username}</option>
									</c:forEach>
									
								</select>
								<div class="control-group">
									<label class="control-label" for="input01">当前进度</label>
									<div class="controls">
										<input type="text" class="span5" id="input01"
											x-webkit-speech="undefined" name="task.rate"
											value="${task.rate}">
									</div>
								</div>

							</div>
						</div>

						<div class="form-actions">
							<button type="submit" class="btn btn-primary">保存</button>
							<button class="btn" onclick="location.back()">返回</button>
						</div>
					</fieldset>
				</form>

			</div>
			<div class="span3"></div>
		</div>
	</div>
</body>
</html>